# import unittest
from test_cases import test_demo1, test_demo2
# #模块名
# loader1 = unittest.defaultTestLoader.loadTestsFromName('test_cases.test_demo1')
# loader2 = unittest.defaultTestLoader.loadTestsFromName('test_cases.test_demo2')
# #类名
# loader3 = unittest.defaultTestLoader.loadTestsFromName('test_cases.test_demo1.MyDemo1TestCase')
# #方法名
# loader4 = unittest.defaultTestLoader.loadTestsFromName('test_cases.test_demo1.MyDemo1TestCase.test1')
#
# lists = ['test_cases.test_demo1.MyDemo1TestCase','test_cases.test_demo2']
# laoder = unittest.defaultTestLoader.loadTestsFromNames(lists)
# # suite
# suite = unittest.TestSuite()
# suite.addTest(laoder)
# # runner
# runner = unittest.TextTestRunner(verbosity=2)
# runner.run(suite)
import unittest
name = unittest.defaultTestLoader.loadTestsFromName('test_cases.test_demo1')
name2 = unittest.defaultTestLoader.loadTestsFromName('test_cases.test_demo2')
list1 = ['test_cases.test_demo1','test_cases.test_demo2']

loder = unittest.defaultTestLoader.loadTestsFromNames(list1)





suite = unittest.TestSuite()
suite.addTest(loder)

runner = unittest.TextTestRunner(verbosity=2)
runner.run(suite)




